package com.ruoyi.pv.service.impl;

import java.util.List;
        import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.pv.mapper.PvClassScoreMapper;
import com.ruoyi.pv.domain.PvClassScore;
import com.ruoyi.pv.service.IPvClassScoreService;

/**
 * 培训班分值Service业务层处理
 *
 * @author zzx
 * @date 2023-06-14
 */
@Service
public class PvClassScoreServiceImpl implements IPvClassScoreService {
    @Autowired
    private PvClassScoreMapper pvClassScoreMapper;

    /**
     * 查询培训班分值
     *
     * @param id 培训班分值主键
     * @return 培训班分值
     */
    @Override
    public PvClassScore selectPvClassScoreById(Long id) {
        return pvClassScoreMapper.selectPvClassScoreById(id);
    }

    /**
     * 查询培训班分值列表
     *
     * @param pvClassScore 培训班分值
     * @return 培训班分值
     */
    @Override
    public List<PvClassScore> selectPvClassScoreList(PvClassScore pvClassScore) {
        return pvClassScoreMapper.selectPvClassScoreList(pvClassScore);
    }

    /**
     * 新增培训班分值
     *
     * @param pvClassScore 培训班分值
     * @return 结果
     */
    @Override
    public int insertPvClassScore(PvClassScore pvClassScore) {
                pvClassScore.setCreateTime(DateUtils.getNowDate());
            return pvClassScoreMapper.insertPvClassScore(pvClassScore);
    }

    /**
     * 修改培训班分值
     *
     * @param pvClassScore 培训班分值
     * @return 结果
     */
    @Override
    public int updatePvClassScore(PvClassScore pvClassScore) {
        return pvClassScoreMapper.updatePvClassScore(pvClassScore);
    }

    /**
     * 批量删除培训班分值
     *
     * @param ids 需要删除的培训班分值主键
     * @return 结果
     */
    @Override
    public int deletePvClassScoreByIds(Long[] ids) {
        return pvClassScoreMapper.deletePvClassScoreByIds(ids);
    }

    /**
     * 删除培训班分值信息
     *
     * @param id 培训班分值主键
     * @return 结果
     */
    @Override
    public int deletePvClassScoreById(Long id) {
        return pvClassScoreMapper.deletePvClassScoreById(id);
    }
}
